/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.gidoo.websites.example;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.gidoo.cms.DefaultConfiguration;
import org.gidoo.cms.GidooCMS;
import org.gidoo.cms.eventhandler.CMSEventListener;
import org.gidoo.cms.eventhandler.OnPublishPageEvent;

/**
 * This is the main class. 
 * @author thomas
 */
public class App extends GidooCMS
{
  @Override
  public String getConfigurationType()
  {
    return DEPLOYMENT;
  }

  @Override
  public DefaultConfiguration createNewConfiguration()
  {
    return new ExampleConfiguration();
  }

  @Override
  protected void init()
  {
    super.init();
    
    getEventManager().addListener(new CMSEventListener<OnPublishPageEvent>()
    {
      @Override
      public void handleEvent(OnPublishPageEvent event)
      {
        Logger.getAnonymousLogger().log(Level.INFO, "page published: " + event.getAbsoluteNodePath());
      }
      
    });
    
  }
  
  
  
}

